<%@ page language="java" %>
<%@ page session="true" %>
<%@ page import="java.sql.*,java.io.*,java.util.Random"%>
 <% String WalkinID = request.getParameter("WalkinID");%>

<HEAD>


	<script LANGUAGE="Javascript" SRC="Images/validate.js"></script>


	<LINK href="styles.css" type="text/css" rel="stylesheet">

</HEAD>
<BODY class=Grad>
<h2 align=center>View Walk-in's</h2>

<%

	Connection con=null;
	ResultSet rs=null;
	Statement stmt=null;
	try{
			
	/* Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	con = DriverManager.getConnection("jdbc:odbc:JobPortal","root",""); */


 			Class.forName("com.mysql.jdbc.Driver");
			con = DriverManager.getConnection("jdbc:mysql://localhost:3306/jobmiller","root","root");



			stmt =  con.createStatement();
			String Query = "Select * from walkindetails where WalkinID='"+WalkinID+"'";
			rs = stmt.executeQuery(Query);}
			catch(Exception e){
			rs.close();
			stmt.close();
			con.close();
			%><%=e%><%
		}
			if(rs!=null)
{
			%>
	<!--Displaying the table header-->

	<br>
<!--	<DIV STYLE="overflow:scroll;width:650px; height:400px;">-->

	
<%
int DisRow=0;
			while(rs.next())
			{
				 WalkinID=rs.getString(1);
				String JobTitle=rs.getString(2);
				String JobDescription=rs.getString(3);
				String Eligbility=rs.getString(4); 
				String Location= rs.getString(5); 
				Date WalkinDate=rs.getDate(6); 
				String WalkinTime=rs.getString(7); 
				String CompanyName=rs.getString(8); 
				String CompanyDescription=rs.getString(9); 
				String Address=rs.getString(10); 
				String Website=rs.getString(11);
				String EmailToRegister=rs.getString(12);
				String FunctionalArea=rs.getString(13);

				DisRow++;
					%>
				<table align=center border=0  width="60%">
				 <tr><td align=Left style="background-color:#82C0FF"><b>WalkinID:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=WalkinID%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF"><b>JobTitle:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=JobTitle%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF" ><b>JobDescription:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=JobDescription%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF" ><b>FunctionalArea:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=FunctionalArea%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF"><b>Eligbility:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=Eligbility%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF"><b>Location:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=Location%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF"><b>WalkinDate:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=WalkinDate%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF"><b>WalkinTime:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=WalkinTime%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF"><b>CompanyName:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=CompanyName%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF"><b>CompanyDescription:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=CompanyDescription%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF"><b>Address:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=Address%></b></font></td></tr>
				<tr><td align=Left style="background-color:#82C0FF"><b>Address:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=Address%></b></font></td></tr>
				 <tr><td align=Left style="background-color:#82C0FF"><b>EmailToRegister:&nbsp;&nbsp;&nbsp;</b></td>
				 <td align=Left style="background-color:#E1E1E1"><font  color="red"><b><%=EmailToRegister%></b></font></td></tr>
				 		
			
					</tr>
					</table>	

	<%
	}


	rs.close();
	
if(DisRow==0)
{
	/*To write to the server if the resultset is null*/
	%>
		<CENTER>
			<tr><th colspan=6>No records found</th></tr><br><br>
		</CENTER>
		

	<%

}
}
%>

</BODY>
</HTML>

